package com.jn.exam.ucenter.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jn.exam.ucenter.entity.Teacher;
import com.jn.exam.ucenter.mapper.TeacherMapper;
import com.jn.exam.ucenter.service.TeacherService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 江南大学1033190417
 * @since 2022-01-13
 */
@Service
public class TeacherServiceImpl extends ServiceImpl<TeacherMapper, Teacher> implements TeacherService {
    @Override
    public Teacher loginByNumber(String number, String password) {
        QueryWrapper<Teacher> wrapper=new QueryWrapper<>();
        wrapper.eq("number",number).eq("password",password);
        Teacher teacher=baseMapper.selectOne(wrapper);
        return teacher;
    }

    @Override
    public Teacher loginByPhone(String phone) {
        return null;
    }
}
